﻿using Hsp.WebNovels.Common.Constants;
using Hsp.WebNovels.Model.Models;
using SqlSugar;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Hsp.WebNovels.Model.Dtos
{
    public class WebSiteDto : WebSite
    {
        #region 分页数据属性

        /// <summary>
        /// 记录行号
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public int RowNumber { get; set; }

        /// <summary>
        /// 记录总数
        /// </summary>
        [SugarColumn(IsIgnore = true)]
        public int RecordCount { get; set; }

        #endregion

        /// <summary>
        /// 地址是否需要组合：0-不需要；1-网站地址 + 章节地址；2-小说地址 + 章节地址；
        /// </summary>
        [DisplayName("地址组合")]
        public string? UrlCombineName 
        {
            get
            {
                return UrlCombine.HasValue ? EnumsHelper.GetName((EnumUrlCombine)UrlCombine) : "";
            }
        }

        /// <summary>
        /// 正文类型：0-文本；1-HTML；
        /// </summary>
        [DisplayName("正文类型")]
        public string? AnnotationTypeName
        {
            get
            {
                return AnnotationType.HasValue ? EnumsHelper.GetName((EnumAnnotationType)AnnotationType) : "";
            }
        }




    }
}
